import { createRouter, createWebHistory } from 'vue-router';
import Home from '../views/Home.vue'; // 新建 Home 组件
import Page from '../views/Page.vue';

const routes = [
    {
        path: '/',
        name: 'Home',
        component: Home // 使用专门的 Home 组件
    },
    {
        path: '/page/:id',
        name: 'Page',
        component: Page
    }
];

const router = createRouter({
    history: createWebHistory(),
    routes
});

export default router;